package com.fau.wmbj.server.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * jpa 配置
 *
 * @author jiawei
 * @version 1.0
 * @datetime 2023-03-06 19:50
 */
@Configuration
@EnableJpaAuditing
public class JpaAutoConfig {
    @PersistenceContext
    private final EntityManager entityManager;

    public JpaAutoConfig(EntityManager entityManager) {
        this.entityManager = entityManager;
    }
}
